﻿@model Wiwi.ViewModels.SearchView

 <div class="grid_8 box-shadow margin-top">
        <h4 class="tabbed xWide">Search Results</h4> 
     
   @if (Model.Searches == null && Model.savedSrches.Count > 0) 
   {
     <p class="serif-it margin-left">Select a saved keyword</p>
        <hr />
       
   } else if(Model.Searches == null) { // No saves and didn't search for anything. (clicked on searches)

       <p class="serif-it margin-left">Start searching WiWi for your wants!</p>
       <hr /> 
   
   }
      @if (Model.Searches != null)
      {
          if (Model.Searches.Count == 0)
          {
        <p class="serif-it margin-left">Sorry! Currently there are no wants for this keyword.</p>
        <hr />
          }


          foreach (var wnt in Model.Searches)
          {      
          @Html.Partial("~/Views/Shared/_WantControl_search.cshtml", wnt)
        
	<hr />   
          

          }
      }
</div>


 <div class="grid_5 box-shadow margin-top">
    <h4 class="tabbed xWide">Saved Searches</h4>
     
    <ul class="no-list padding">
        @if (Model.savedSrches != null)
        {
            if (Model.savedSrches.Count > 0)
            {

                foreach (var sv in Model.savedSrches)
                {
             <li> @Html.ActionLink(sv.SearchTerm, "MySearches", "Want", new { srchid = sv.SearchID }, new { @class = "blue-button button-m xWide" }) </li> 
           @*  eg // <li> <a href="/Want/MySearches?srchid=5">skyline</a> </li> *@
            
           
                }

            }
            else
            {
                <li>You have no saved searches!</li>
            
            }
        }
        
                
    </ul>    
  
</div>

    

